home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 018a / macade41.zip / BRINGBAK.DOC < prev    next >
Text File  |  1991-08-15  |  8KB  |  166 lines

  1.                            BringBak.wpm
  2.                Enables Information from an External
  3.               Process to be Imported into WordPerfect
  4.  
  5.                                 by
  6.  
  7.                       Jeffrey S. Kane, Ph.D.
  8.                 Performance Sciences International
  9.                           Summerfield, NC
  10.  
  11. 1.   Read the REGISTER.doc, LICENSE.doc, and WARRANTY.doc files distributed
  12.      with this macro.
  13.  
  14. 2.   Requires:
  15.      
  16.      A.   WordPerfect 5.1
  17.  
  18.      B.   Access to AutoBak.exe and USendBak.exe somewhere on the user's
  19.       system (i.e., on either a floppy or hard drive).
  20.  
  21. 3.   Features:
  22.  
  23.      A.   Enables up to 120 characters to be imported back into a
  24.           WordPerfect variable from an outside program or process. 
  25.           This information may consist of such items as:
  26.  
  27.           1)   A computational result
  28.           2)   A data base element retrieved by an external
  29.                program.
  30.           3)   The location and name of a results file produced by
  31.                an external program to enable its immediate
  32.                importation to WordPerfect.
  33.           4)   The optimal location (i.e., drive) to which to
  34.                export a file in terms of space availability,
  35.                proximity of similar files, etc.  (This information
  36.                could be quickly determined by external utilities
  37.                and returned to a macro that would then write out
  38.                the file.)
  39.           5)   The status of the system and its peripherals.
  40.  
  41.      B.   While obtaining information such as that described above
  42.           by manually executing the necessary processes and typing
  43.           in the information to be brought back to WordPerfect
  44.           would be very useful in some circumstances, even more
  45.           exciting possibilities lie in automating such a process
  46.           through a combination of macros, batch files, and
  47.           external programs.  For example, each of the categories
  48.           of information listed under A (above) could be generated
  49.           and retrieved automatically for use in the preparation,
  50.           storage, and reproduction of documents.
  51.         The data to be brought back from external processes
  52.       may be entered either manually on the command line of the
  53.       .exe program that accomplishes the importation, or the name
  54.       of a file containing the data may alternatively be entered.
  55.  
  56.      C.   Two forms of the external importation program, AutoBak.exe
  57.       and USendBak.exe, allow the user the choice of either being
  58.       automatically returned to WordPerfect after the data is
  59.       imported or having the option to issue the necessary EXIT
  60.       command at any point desired after the data is imported.
  61.  
  62. 4.   Installation:
  63.  
  64.           Installing BringBak.wpm requires no more than copying the
  65.      latter file plus SetNV.wpm and ParseNV.wpm to the directory where
  66.      your WordPerfect macros are located, and copying AutoBak.exe and
  67.      USendBak.exe to the same or equally accessible directory.    The
  68.      BringBak system operates completely on your computer's memory
  69.      rather than on other files, so the location of the .exe file is
  70.      not critical.
  71.  
  72. 5.   Operation:
  73.  
  74.      A.   The BringBak.wpm macro performs important but much less
  75.       difficult tasks than AutoBak.exe and USendBak.exe.
  76.       Specifically, it sets aside an area of memory to receive
  77.       the outside information and it truncates the information
  78.       received in that area to minimum size and assigns it to the
  79.       variable NewVar.  You may, therefore, execute the BringBak
  80.       macro directly or you may have another macro chain or nest to
  81.           it, presumably with the idea of acting upon the
  82.           information returned in NewVar.
  83.  
  84.      B.   Executing the BringBak macro puts you in a DOS shell.  At
  85.           that point you (or a batch file) will execute some
  86.           outside process and produce a result or file name or some
  87.           code that is to be sent back to WordPerfect.  This
  88.       information must be kept to 120 characters or less.
  89.  
  90.      C.   The importation of the information back into WordPerfect is
  91.       accomplished by either of two .exe programs: AutoBak.exe or
  92.       USendBak.exe.  The only difference between these programs is
  93.       whether or not they automatically issue an EXIT command upon
  94.       their termination.  AutoBak.exe issues an EXIT, causing an
  95.       immediate attempt to return to WordPerfect from a DOS shell
  96.       upon the program's termination.  USendBak.exe does NOT issue
  97.       an EXIT command upon termination.  Return to DOS from a SHELL
  98.       must, therefore, be explicitly directed by the user or by a
  99.       batch file from which the USendBak program was executed.
  100.         Use AutoBak.exe when you've invoked a DOS shell from
  101.       WordPerfect, not just issued a DOS command.  Save it as the
  102.       last command to be executed in the SHELL and use it to return
  103.       to WordPerfect.  Use USendBak.exe when you've invoked a single
  104.       DOS command to execute a batch file and you want to control
  105.       when the batch file returns control to WordPerfect.
  106.  
  107.      D.   Data is returned to WordPerfect via either .exe program in one
  108.       of two ways:
  109.         1) It is typed in by the user directly on the command line.
  110.            (e.g., AUTOBAK This is the data I want to bring back.)
  111.         2) A file name, preceded by an @ sign, is entered on the
  112.            command line to designate the file holding the data
  113.            to be imported. (e.g., USENDBAK @d:\stats\means)
  114.       Either of the above ways of specifying the data to be returned
  115.       may be entered on the .exe program's command line in any of
  116.       the following ways:
  117.         1) manually typed in by the user
  118.         2) written to the line in a batch file following the commands
  119.            for the external processes that are generating the data
  120.            to be brought back.
  121.         3) in the case of an @filename, the filename may always
  122.            be the same or it may be passed as an argument in the
  123.            DOS command issued from WordPerfect.
  124.  
  125.      E.   The SetNV.wpm and ParseNV.wpm macros allow you to set up an
  126.       importation variable from within another macro, bring back up
  127.       to 120 bytes of data and put it in NewVar, and use the data
  128.       in NewVar for any purposes that the parent macro may require.
  129.       One big difference from simply {NEST}ing to BringBak.wpm is
  130.       that SetNV sets up the importation variable without proceeding
  131.       immediately with a SHELL to DOS. Thus, the type of SHELL and,
  132.       if it is a single DOS command execution, the specific command
  133.       and the arguments it contains is completely under user control.
  134.       The other difference is that, upon return from the external
  135.       process, no messages or prompts are issued, and the actions
  136.       taken, even in the case of failure to obtain the data sought,
  137.       are completely under user control.
  138.         The most common use of these macros will likely be
  139.       their invocation at desired points in other macros via {NEST}
  140.       commands.  All that is required to invoke these macros is the
  141.       issuance of the following commands at the desired points within
  142.       a macro:
  143.                 {NEST}SetNV~
  144.                 {NEST}ParseNV~
  145.         It should be noted that ParseNV.wpm contains a commented
  146.       section which indicates that commands may be specifically entered
  147.       in that section to govern the action to be taken in the event
  148.       that no data is returned.  Also, although these macros weren't
  149.       specifically used, most of their content was used in the portion
  150.       of the EditWP.wpm macro that controls the SHELL to the external
  151.       macro compilation program.  This is a good example of the utility
  152.       of these macros.
  153.  
  154. 6.   Technical support:
  155.  
  156.      Free technical support will be furnished to any licensed user
  157.      who calls on weekdays during the hours from 9:00 a.m. to 5:00 p.m.
  158.      (Eastern) at the following number:  (919) 643-3492
  159.  
  160.      We may also be reached by mail at:
  161.  
  162.      Performance Sciences International
  163.      Suite 1250
  164.      3001 Latta Drive
  165.      Summerfield, NC  27358
  166.